#include "awtk.h"

ret_t on_touch_event(void* ctx, event_t* evt) {
    widget_t* widget = WIDGET(ctx);

    if (evt->type == EVT_CLICK) {
        // 处理点击事件
        return RET_OK;
    }

    return RET_OK;
}

ret_t application_init() {
    widget_t* win = window_create(NULL, 0, 0, 0, 0);
    widget_t* button = button_create(win, 10, 10, 80, 30);

    widget_on(button, EVT_CLICK, on_touch_event, button);

    return RET_OK;
}
